package com.milk.service.admin;

import java.util.List;
import java.util.Map;

import com.milk.model.entity.admin.Admin;
import com.milk.model.entity.admin.Function;
import com.milk.model.entity.admin.Role;

public interface AdminService {
	
	long save(Admin admin);
	
	
	void update(Admin admin);
	
	
	void delete(long adminId);
	
	
	Admin findById(long adminId);
	
	Admin findByUserName(String username);
	
	List<Admin> query(Map<String,Object> params);
	
	void upToAdministrator(long adminId);
	
	void downFromAdministrator(long adminId);
	
	//----------------------------------------
	
	void addFunctionToRole(List<Map<String,Object>> functions);
	
	long saveRole(Role role);
	
	long deleteRole(long roleId);
	
	List<Role> queryRoles(Map<String,Object> params);
	
	//------------------------------------------
	
	long saveFunction(Function function);
	
	long deleteFunction(long funcId);
	
	List<Function> queryAllFunction(Map<String,Object> params);
	
}
